//
//  NSData+AES.h
//  JSBasicFramework
//
//  Created by Apple on 2019/9/12.
//  Copyright © 2019 Apple. All rights reserved.
//

#import <Foundation/Foundation.h>
/*kCCKeySizeAES128          = 16,
 kCCKeySizeAES192          = 24,
 kCCKeySizeAES256          = 32,
 kCCKeySizeDES             = 8,
 kCCKeySize3DES            = 24,
 kCCKeySizeMinCAST         = 5,
 kCCKeySizeMaxCAST         = 16,
 kCCKeySizeMinRC4          = 1,
 kCCKeySizeMaxRC4          = 512,
 kCCKeySizeMinRC2          = 1,
 kCCKeySizeMaxRC2          = 128,
 kCCKeySizeMinBlowfish     = 8,
 kCCKeySizeMaxBlowfish     = 56,*/
typedef NS_ENUM(NSUInteger, JSAESSIZETYPE) {
    JSAESSIZETYPE128,
    JSAESSIZETYPE192,
    JSAESSIZETYPE256,
    JSAESSIZETYPEDES,
    JSAESSIZETYPE3DES,
    JSAESSIZETYPEMainCAST,
    JSAESSIZETYPEMaxCAST,
    JSAESSIZETYPEMinRC2,
    JSAESSIZETYPEMaxRC2,
    JSAESSIZETYPEMinBlowfish,
    JSAESSIZETYPEMaxBlowfish
};

NS_ASSUME_NONNULL_BEGIN

@interface NSData (AES)

//加密
//- (NSData *)AESEncryptWithSizeType:(JSAESSIZETYPE) type Key:(NSString *)key iv:(NSString *)iv;
//
////解密
//- (NSData *)AESDecryptWithSizeType:(JSAESSIZETYPE) type Key:(NSString *)key iv:(NSString *)iv;

//加密
- (NSData *)AES256EncryptWithKey:(NSString *)key iv:(NSString *)iv;

//解密
- (NSData *)AES256DecryptWithKey:(NSString *)key iv:(NSString *)iv;




@end

NS_ASSUME_NONNULL_END
